﻿Imports CommonLayer

Public Class frmInventoryItemDetail
    Inherits frmBaseDictionaryDetail

#Region "Declaration"

#End Region

    Public Overrides ReadOnly Property PermissionID() As PermissionEnum
        Get
            Return PermissionEnum.Employee
        End Get
    End Property

#Region "Property"

#Region "Show/Hide Tool "

#End Region

#End Region

#Region "Contructor"

#End Region

#Region "Public"

    Protected Overrides Sub SetEnableControl(ByVal bEnable As Boolean)
        MyBase.SetEnableControl(bEnable)
        txtCode.ReadOnly = Not bEnable
        txtDiscountRate.ReadOnly = bEnable
        txtName.ReadOnly = Not bEnable
        'txtAddress.ReadOnly = Not bEnable
        'txtCode.ReadOnly = Not bEnable
        'txtName.ReadOnly = Not bEnable
        'txtAddress.ReadOnly = Not bEnable
        'txtTel.ReadOnly = Not bEnable
        'cboDepartment.ReadOnly = Not bEnable
    End Sub

#Region "InitData"

    ''' <summary>
    ''' Hien thi du lieu cho cac combo
    ''' </summary>
    Protected Overrides Sub InitDataToCombo()
        MyBase.InitDataToCombo()
        bsStock.DataSource = dsDictionary
        bsStock.Sort = dsDictionary.Stock.StockCodeColumn.ColumnName
        CommonFunction.RefineCombo(cboStock)

        bsItemCategory.DataSource = dsDictionary
        bsItemCategory.Sort = dsDictionary.ItemCategory.ItemCategoryNameColumn.ColumnName
        CommonFunction.RefineCombo(cboItemCategory)
    End Sub

    Protected Overrides Function InitAddNewRow() As DataRow
        If m_firstFocusControl Is Nothing Then
            m_firstFocusControl = txtCode
        End If
        Return oBLDictionary.AddNewEmployee
    End Function

#End Region

#Region "Validate"

#End Region

#Region "Others"

#End Region

#Region "Private Method"


#End Region

#End Region

#Region "Events"


#End Region
End Class
